package custom.base.utils.notification;

import android.content.Context;

import custom.base.utils.store.PreferencesManager;


/**
 * Created by cubebox on 2017/9/13.
 */

public class MsgRemaindUtils {
    private static MsgRemaindUtils instance = null;


    public static MsgRemaindUtils getInstance() {
        synchronized (MsgRemaindUtils.class) {
            if (instance == null)
                instance = new MsgRemaindUtils();
        }
        return instance;
    }

    /**
     * 设置是否接受通知栏消息
     */
    public void setNotificationRemaindAble(Context context, boolean flag) {
        PreferencesManager.getInstance(context).putBoolean(PreferencesManager.PRE_NOTIFICATION_ABLE, flag);
    }

    /**
     * 通知栏消息提醒可用性
     */
    public boolean isNotificationRemaindAble(Context context) {
        return PreferencesManager.getInstance(context).getBoolean(PreferencesManager.PRE_NOTIFICATION_ABLE, true);
    }

}
